<?php session_start(); if($_SESSION['properlogin'] != 1){ header("Location:error.html"); }?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Check-in</title>
<script type="text/javascript" src="validateInformation.js" >
</script>
<?php
if(isset($_POST['Done']))
{
	$snum=$_POST['studNum1'].$_POST['studNum2'];
	$date=$_POST['chkDate'].$_POST['chkMonth'].$_POST['chkYear'];
	$term=$_POST['dateCheckin'];
	$room=$_POST['roomNo'];
	$fname=$_POST['firstName'];
	$mname=$_POST['middleName'];
	$lname=$_POST['lastName'];
	//LogView::insertResidentLog($snum,$date,$term,$room);
	$_SESSION['snum']=$snum;
	$_SESSION['term']=$term;
	$_SESSION['date']=$date;
	$_SESSION['roomNo']=$room;
	$_SESSION['fname']=$fname;
	$_SESSION['mname']=$mname;
	$_SESSION['lname']=$lname;
	header("Location: logForm.php");
}
?>


<link href="style.css" rel="stylesheet" type="text/css" />
</head>

<body>
<table width="100%" border="0" cellpadding="1">
 
  <tr>
    <td>&nbsp;</td>
    <td class="subBanner"><strong> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Resident Check-in</strong></td>
    <td>&nbsp;</td>
  </tr>
  <tr>
    <td>&nbsp;</td>
    <td><form id="form1" name="form1" method="post" onsubmit="return validateInformation4(this)" action="">
      <table width="100%" border="0" cellpadding="1">
        <tr>
          <td>Student Number</td>
          <td><strong>
          <input name="studNum1" type="text" id="studNum1" size="3" />
-
<input name="studNum2" type="text" id="studNum2" size="7" />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </strong>&nbsp;</td>
          <td id="snum" class="error">&nbsp;</td>
        </tr>
        <tr>
          <td>Last Name</td>
          <td width="34%"><input name="lastName" type="text" id="lastName" size="40" />
  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td>
          <td id="date4" class="error">&nbsp;</td>
        </tr>
        <tr>
          <td>First Name</td>
          <td><input name="firstName" type="text" id="firstName" size="40" />
  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td>
          <td id="date3" class="error">&nbsp;</td>
        </tr>
        <tr>
          <td>Middle Name</td>
          <td><input name="middleName" type="text" id="firstName2" size="40" />
  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td>
          <td id="date2" class="error">&nbsp;</td>
        </tr>
        <tr>
          <td width="37%"><strong>Date Check-In</strong></td>
          <td width="34%"><strong>
            <select name="chkMonth" id="chkMonth">
              <option selected="selected" value="JAN">January</option>
              <option value="FEB">February</option>
              <option value="MAR">March</option>
              <option value="APR">April</option>
              <option value="MAY">May</option>
              <option value="JUN">June</option>
              <option value="JUL">July</option>
              <option value="AUG">August</option>
              <option value="SEP">September</option>
              <option value="OCT">October</option>
              <option value="NOV">November</option>
              <option value="DEC">December</option>
            </select>
&nbsp;
<label for="bdDay"></label>
<label for="chkDate"></label>

<select name="chkDate" id="chkDate">
           <option selected="selected" value="01">1</option>
              <option value="02">2</option>
              <option value="03">3</option>
              <option value="04">4</option>
              <option value="05">5</option>
              <option value="06">6</option>
              <option value="07">7</option>
              <option value="08">8</option>
              <option value="09">9</option>
              <option value="10">10</option>
			  <option value="11">11</option>
              <option value="12">12</option>
              <option value="13">13</option>
              <option value="14">14</option>
              <option value="15">15</option>
              <option value="16">16</option>
              <option value="17">17</option>
              <option value="18">18</option>
              <option value="19">19</option>
			  <option value="20">20</option>
              <option value="21">21</option>
              <option value="22">22</option>
              <option value="23">23</option>
              <option value="24">24</option>
              <option value="25">25</option>
              <option value="26">26</option>
              <option value="27">27</option>
              <option value="28">28</option>
			  <option value="29">29</option>
              <option value="30">30</option>
              <option value="31">31</option>

          </select>

&nbsp;
<label for="chkYear"></label>
<select name="chkYear" id="chkYear">
  <option value="2008">2008</option>
  <option value="2009">2009</option>
  <option value="2010">2010</option>
  <option value="2011">2011</option>
</select>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;          </strong></td>
          <td width="29%" id="date" class="error">&nbsp;</td>
        </tr>
        <tr>
          <td>Term</td>
          <td><strong><input type="radio" name="dateCheckin" id="gender" value="first" />
      First Semester 
      <input type="radio" name="dateCheckin" id="gender2" value="second" />
      Second Semester
    <input type="radio" name="dateCheckin" id="gender3" value="summer" />
      Summer&nbsp;</strong></td>
          <td id="trm" class="error">&nbsp;</td>
        </tr>
        <tr>
          <td>Room Number</td>
          <td><strong>
            <input type="text" name="roomNo" id="roomNo" size="3" />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;            </strong></td>
          <td id="rn" class="error">&nbsp;</td>
        </tr>
        <tr>
          <td>&nbsp;</td>
          <td>&nbsp;</td>
          <td>&nbsp;</td>
        </tr>
        <tr>
          <td>&nbsp;</td>
          <td><input type="submit" name="Done" id="Done" value="Done" /></td>
          <td>&nbsp;</td>
        </tr>
        <tr>
          <td>&nbsp;</td>
          <td>&nbsp;</td>
          <td>&nbsp;</td>
        </tr>
        <tr>
          <td>&nbsp;</td>
          <td></td>
          <td>&nbsp;</td>
        </tr>
      </table>
    </form></td>
    <td>&nbsp;</td>
  </tr>
  <tr>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
  </tr>
</table>
</body>
</html>